package coop.tecso.test.objets.complex;

//src/gen
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinColumns;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Version;

/**
 *
 */
@Entity
@Table(name = "COUPON_FLOWN")
public class CouponFlown implements java.io.Serializable {
	private static final long serialVersionUID = 1L;
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO, generator = "COUPON_FLOWN_SEQ")
	@SequenceGenerator(name = "COUPON_FLOWN_SEQ", sequenceName = "COUPON_FLOWN_SEQ", allocationSize = 1)
	@Column(name = "COUPON_FLOWN_ID", nullable = false)
	private int id;
	@Version
	@Column(name = "VERSION")
	private int couponFlownversion;

	/**
	 *
	 */
	@Basic(optional = false)
	@Column(name = "CABIN_CLASS", nullable = false, length = 2)
	private String cabinClass;

	/**
	 *
	 */
	@Basic(optional = false)
	@Column(name = "MARKETING_CARRIERA", nullable = false, length = 3)
	private String marketingCarrierA;

	/**
	 *
	 */
	@Basic(optional = false)
	@Column(name = "MARKETING_CARRIERN", nullable = false, length = 4)
	private int marketingCarrierN;

	/**
	 *
	 */
	@Basic(optional = false)
	@Column(name = "OPERATING_CARRIERA", nullable = false, length = 3)
	private String operatingCarrierA;

	/**
	 *
	 */
	@Basic(optional = false)
	@Column(name = "OPERATING_CARRIERN", nullable = false, length = 4)
	private int operatingCarrierN;

	/**
	 *
	 */
	@Basic(optional = false)
	@Column(name = "COUPON_DEPARTURE_AIRPORT", nullable = false, length = 5)
	private String couponDepartureAirport;

	/**
	 *
	 */
	@Basic(optional = false)
	@Column(name = "COUPON_ARRIVAL_AIRPORT", nullable = false, length = 5)
	private String couponArrivalAirport;

	/**
	 *
	 */
	@Column(name = "VALIDATING_CARRIER", length = 4)
	private String validatingCarrier;

	/**
	 *
	 */
	@Column(name = "FLIGHT_DEPARTURE_AIRPORT", length = 5)
	private String flightDepartureAirport;

	/**
	 *
	 */
	@Column(name = "FLIGHT_ARRIVAL_AIRPORT", length = 5)
	private String flightArrivalAirport;

	/**
	 *
	 */
	@Column(name = "ORIGINAL_FLIGHT_NUMBER", length = 5)
	private String originalFlightNumber;

	/**
	 *
	 */
	@Temporal(TemporalType.DATE)
	@Column(name = "SCHEDULED_FLIGHT_DATE", length = 8)
	private java.util.Date scheduledFlightDate;

	/**
	 *
	 */
	@Column(name = "TEC_CREATION_USER", length = 255)
	private String tecCreationUser;

	/**
	 *
	 */
	@Column(name = "TEC_CREATION_TIMESTAMP")
	private java.sql.Timestamp tecCreationTimestamp;

	/**
	 *
	 */
	@Column(name = "TEC_MODIFICATION_TIMESTAMP")
	private java.sql.Timestamp tecModificationTimestamp;

	/**
	 *
	 */
	@Column(name = "TEC_MODIFICATION_USER", length = 255)
	private String tecModificationUser;

	/**
	 *
	 */
	@Column(name = "TEC_DELETED")
	private Boolean tecDeleted;

	/**
	 *
	 */
	@Basic(optional = false)
	@Column(name = "COUPON_FLOWN_TYPE_FK", nullable = false, length = 4)
	private String couponFlownTypeFk;

	/**
	 *
	 */
	@OneToOne(targetEntity = CouponUsed.class, optional = false, fetch = FetchType.LAZY)
	@JoinColumns({ @JoinColumn(name = "COUPON_USED_FK", referencedColumnName = "COUPON_USED_ID", nullable = false) })
	private CouponUsed couponUsed;

	/**
	 *
	 */
	@OneToMany(targetEntity = CouponFlownEmd.class, mappedBy = "couponFlown", fetch = FetchType.LAZY)
	private java.util.Set<CouponFlownEmd> couponFlownEmd = new java.util.HashSet<CouponFlownEmd>();

	/**
	 *
	 */
	@OneToMany(targetEntity = ManifestCouponFlown.class, mappedBy = "couponFlown", fetch = FetchType.LAZY)
	private java.util.Set<ManifestCouponFlown> manifestCouponFlown = new java.util.HashSet<ManifestCouponFlown>();

	/**
	 *
	 */
	@OneToOne(targetEntity = CouponFlownMtk.class, mappedBy = "couponFlown", fetch = FetchType.LAZY)
	@JoinColumns({ @JoinColumn(name = "COUPON_FLOWN_MTK_FK", referencedColumnName = "COUPON_FLOWN_MTK_ID") })
	private CouponFlownMtk couponFlownMtk;

	/**
	 *
	 */
	@OneToOne(targetEntity = CouponFlownMco.class, mappedBy = "couponFlown", fetch = FetchType.LAZY)
	@JoinColumns({ @JoinColumn(name = "COUPON_FLOWN_MCO_FK", referencedColumnName = "COUPON_FLOWN_MCO_ID") })
	private CouponFlownMco couponFlownMco;

	/**
	 *
	 */
	@OneToOne(targetEntity = CouponFlownMpd.class, mappedBy = "couponFlown", fetch = FetchType.LAZY)
	@JoinColumns({ @JoinColumn(name = "COUPON_FLOWN_MPD_FK", referencedColumnName = "COUPON_FLOWN_MPD_ID") })
	private CouponFlownMpd couponFlownMpd;

	/**
	 *
	 */
	@OneToOne(targetEntity = CouponFlownPax.class, mappedBy = "couponFlown", fetch = FetchType.LAZY)
	@JoinColumns({ @JoinColumn(name = "COUPON_FLOWN_PAX_FK", referencedColumnName = "COUPON_FLOWN_PAX_ID") })
	private CouponFlownPax couponFlownPax;

	/**
	 *
	 */
	@ManyToOne(targetEntity = Fim.class, fetch = FetchType.LAZY)
	@JoinColumns({ @JoinColumn(name = "FIM_FK", referencedColumnName = "FIM") })
	private Fim fim;

	/**
	 *
	 */
	@OneToOne(targetEntity = CouponFlownXsb.class, mappedBy = "couponFlown", fetch = FetchType.LAZY)
	@JoinColumns({ @JoinColumn(name = "COUPON_FLOWN_XSB_FK", referencedColumnName = "COUPON_FLOWN_XSB_ID") })
	private CouponFlownXsb couponFlownXsb;

	public CouponFlown() {
	}

	// Constructor for primary key
	public CouponFlown(int id) {
		this.id = id;
	}

	/**
	 * Autogenerated key
	 */
	public int getId() {
		return id;
	}

	public int getCouponFlownversion() {
		return couponFlownversion;
	}

	public void setCouponFlownversion(int couponFlownversion) {
		this.couponFlownversion = couponFlownversion;
	}

	public String getCabinClass() {
		return cabinClass;
	}

	public void setCabinClass(String cabinClass) {
		this.cabinClass = cabinClass;
	}

	public String getMarketingCarrierA() {
		return marketingCarrierA;
	}

	public void setMarketingCarrierA(String marketingCarrierA) {
		this.marketingCarrierA = marketingCarrierA;
	}

	public int getMarketingCarrierN() {
		return marketingCarrierN;
	}

	public void setMarketingCarrierN(int marketingCarrierN) {
		this.marketingCarrierN = marketingCarrierN;
	}

	public String getOperatingCarrierA() {
		return operatingCarrierA;
	}

	public void setOperatingCarrierA(String operatingCarrierA) {
		this.operatingCarrierA = operatingCarrierA;
	}

	public int getOperatingCarrierN() {
		return operatingCarrierN;
	}

	public void setOperatingCarrierN(int operatingCarrierN) {
		this.operatingCarrierN = operatingCarrierN;
	}

	public String getCouponDepartureAirport() {
		return couponDepartureAirport;
	}

	public void setCouponDepartureAirport(String couponDepartureAirport) {
		this.couponDepartureAirport = couponDepartureAirport;
	}

	public String getCouponArrivalAirport() {
		return couponArrivalAirport;
	}

	public void setCouponArrivalAirport(String couponArrivalAirport) {
		this.couponArrivalAirport = couponArrivalAirport;
	}

	public String getValidatingCarrier() {
		return validatingCarrier;
	}

	public void setValidatingCarrier(String validatingCarrier) {
		this.validatingCarrier = validatingCarrier;
	}

	public String getFlightDepartureAirport() {
		return flightDepartureAirport;
	}

	public void setFlightDepartureAirport(String flightDepartureAirport) {
		this.flightDepartureAirport = flightDepartureAirport;
	}

	public String getFlightArrivalAirport() {
		return flightArrivalAirport;
	}

	public void setFlightArrivalAirport(String flightArrivalAirport) {
		this.flightArrivalAirport = flightArrivalAirport;
	}

	public String getOriginalFlightNumber() {
		return originalFlightNumber;
	}

	public void setOriginalFlightNumber(String originalFlightNumber) {
		this.originalFlightNumber = originalFlightNumber;
	}

	public java.util.Date getScheduledFlightDate() {
		return scheduledFlightDate;
	}

	public void setScheduledFlightDate(java.util.Date scheduledFlightDate) {
		this.scheduledFlightDate = scheduledFlightDate;
	}

	public String getTecCreationUser() {
		return tecCreationUser;
	}

	public void setTecCreationUser(String tecCreationUser) {
		this.tecCreationUser = tecCreationUser;
	}

	public java.sql.Timestamp getTecCreationTimestamp() {
		return tecCreationTimestamp;
	}

	public void setTecCreationTimestamp(java.sql.Timestamp tecCreationTimestamp) {
		this.tecCreationTimestamp = tecCreationTimestamp;
	}

	public java.sql.Timestamp getTecModificationTimestamp() {
		return tecModificationTimestamp;
	}

	public void setTecModificationTimestamp(java.sql.Timestamp tecModificationTimestamp) {
		this.tecModificationTimestamp = tecModificationTimestamp;
	}

	public String getTecModificationUser() {
		return tecModificationUser;
	}

	public void setTecModificationUser(String tecModificationUser) {
		this.tecModificationUser = tecModificationUser;
	}

	public Boolean getTecDeleted() {
		return tecDeleted;
	}

	public void setTecDeleted(Boolean tecDeleted) {
		this.tecDeleted = tecDeleted;
	}

	public String getCouponFlownTypeFk() {
		return couponFlownTypeFk;
	}

	public void setCouponFlownTypeFk(String couponFlownTypeFk) {
		this.couponFlownTypeFk = couponFlownTypeFk;
	}

	public CouponUsed getCouponUsed() {
		return couponUsed;
	}

	public void setCouponUsed(CouponUsed couponUsed) {
		this.couponUsed = couponUsed;
	}

	public java.util.Set<CouponFlownEmd> getCouponFlownEmd() {
		return couponFlownEmd;
	}

	public void setCouponFlownEmd(java.util.Set<CouponFlownEmd> couponFlownEmd) {
		this.couponFlownEmd = couponFlownEmd;
	}

	public void addCouponFlownEmd(CouponFlownEmd couponFlownEmd) {
		this.couponFlownEmd.add(couponFlownEmd);
	}

	public void removeCouponFlownEmd(CouponFlownEmd couponFlownEmd) {
		this.couponFlownEmd.remove(couponFlownEmd);
	}

	public java.util.Set<ManifestCouponFlown> getManifestCouponFlown() {
		return manifestCouponFlown;
	}

	public void setManifestCouponFlown(java.util.Set<ManifestCouponFlown> manifestCouponFlown) {
		this.manifestCouponFlown = manifestCouponFlown;
	}

	public void addManifestCouponFlown(ManifestCouponFlown manifestCouponFlown) {
		this.manifestCouponFlown.add(manifestCouponFlown);
	}

	public void removeManifestCouponFlown(ManifestCouponFlown manifestCouponFlown) {
		this.manifestCouponFlown.remove(manifestCouponFlown);
	}

	public CouponFlownMtk getCouponFlownMtk() {
		return couponFlownMtk;
	}

	public void setCouponFlownMtk(CouponFlownMtk couponFlownMtk) {
		this.couponFlownMtk = couponFlownMtk;
	}

	public CouponFlownMco getCouponFlownMco() {
		return couponFlownMco;
	}

	public void setCouponFlownMco(CouponFlownMco couponFlownMco) {
		this.couponFlownMco = couponFlownMco;
	}

	public CouponFlownMpd getCouponFlownMpd() {
		return couponFlownMpd;
	}

	public void setCouponFlownMpd(CouponFlownMpd couponFlownMpd) {
		this.couponFlownMpd = couponFlownMpd;
	}

	public CouponFlownPax getCouponFlownPax() {
		return couponFlownPax;
	}

	public void setCouponFlownPax(CouponFlownPax couponFlownPax) {
		this.couponFlownPax = couponFlownPax;
	}

	public Fim getFim() {
		return fim;
	}

	public void setFim(Fim fim) {
		this.fim = fim;
	}

	public CouponFlownXsb getCouponFlownXsb() {
		return couponFlownXsb;
	}

	public void setCouponFlownXsb(CouponFlownXsb couponFlownXsb) {
		this.couponFlownXsb = couponFlownXsb;
	}
}
